package com.wyw.springcloud.hystrix;

import com.wyw.springcloud.common.bean.Student;
import com.wyw.springcloud.service.MyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 文件介绍
 *
 * @Author： Mr Wu （yewen.wu.china.gmail.com）
 * @Date: 2020/9/30 15:01
 */
@Slf4j
@Component
public class Fallback implements MyService {

    @Override
    public String error() {
        log.info("Fallback: I'm not a black sheep any more");
        return "Fallback: I'm not a black sheep any more";
    }


    @Override
    public String sayHi() {
        return null;
    }

    @Override
    public Student sayHiPost(Student friend) {
        return null;
    }

    @Override
    public String retry(@RequestParam(name = "timeout") int timeout) {
        return "You are late !";
    }


}
